package com.tianlh.service.design_pattern.Observable;

import java.util.Observable;

/**
 *
 * @author wb-tianlihui
 * @date 2017/12/19
 */
public class Teacher extends Observable {

    //布置作业的状态信息字符串
    private String info;

    public void setHomework(String info) {

        this.info=info;
        System.out.println("布置的作业是"+info);

        setChanged();
        notifyObservers(info);
    }

    public String getInfo() {
        return info;
    }
}
